home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
t3_1
/
risc_src.lha
/
risc_sources
/
xlib
/
make-exports.t
< prev
next >
Wrap
Text File
|
1990-06-05
|
2KB
|
77 lines
(HERALD test (env tsys))
(define (get-defined file l)
(with-open-ports ((port (open (filename-with-type (->filename file) 't) 'in)))
(iterate loop ((form (read port)) (l l))
(cond ((eof? form) l)
((atom? form) (loop (read port) l))
((or (eq? (car form) 'define)
(eq? (car form) 'define-constant))
(let ((thing (cadr form)))
(let ((name (if (atom? thing) thing (car thing))))
(if (memq? name l)
(loop (read port) l)
(loop (read port) (cons name l))))))
(else
(loop (read port) l))))))
(define (make-exports files)
(do ((l '() (get-defined (car files) l))
(files files (cdr files)))
((null? files)
(with-open-ports ((port (open '(xlib exports t) 'out)))
(format port '("(herald exports)~%(walk (lambda (x) "
"(*define standard-env x (*value xlib-env x)))"
"(quote ~g))~%")
l)))
(format t "~%~S" (car files))))
(make-exports
'((xlib depth)
(xlib screen)
(xlib visual)
(xlib xarc)
(xlib xchar2b)
(xlib xcharstruct)
(xlib xclasshint)
(xlib xcolor)
(xlib xcomposestatus)
(xlib xevent)
(xlib xfontprop)
(xlib xfontstruct)
(xlib xgcvalues)
(xlib xhostaddress)
(xlib xiconsize)
(xlib ximage)
(xlib xkeyboardcontrol)
(xlib xkeyboardstate)
(xlib xmodifierkeymap)
(xlib xpoint)
(xlib xrectangle)
(xlib xrmoptiondescrec)
(xlib xrmvalue)
(xlib xsegment)
(xlib xsetwindowattributes)
(xlib xsizehints)
(xlib xstandardcolormap)
(xlib xtextitem)
(xlib xtextitem16)
(xlib xtimecoord)
(xlib xvisualinfo)
(xlib xwindowattributes)
(xlib xwindowchanges)
(xlib xwmhints)
(xlib xwss)
(xlib xws2)
(xlib xws3)
(xlib xws4)
(xlib xws5)
(xlib xws6)
(xlib xws7)
(xlib xws8)
(xlib xws9)
(xlib xws10)
(xlib xlibconstants)
(xlib xlibtypes)))